from django.urls import path, include
from . import views

# app_name = "jd"

# 酒店  房间
# hotel = [

#     path('ChaKanJD/', views.JDpage,name='ChaKanJD'),
#     path('htadd/',views.htadd,name='htadd'),

#     path('adminhtQuery/',views.adminhtQuery,name='adminhtquery'),
#     path('addroom/',views.roomAdd,name='roomAdd'),
#     # path('search/', views.search, name='search'),
#     path('edit_hotel/<htid>/', views.editHotel, name='editHotel'),
#     path('ChaKanRoom/', views.Roompage,name='ChaKanRoom'),
#     path('searchRoom/', views.searchRoom, name='searchRoom'),
#     path('update-room/<int:id>/', views.update_room, name='Roomupdate'),
#     path('delete-hotel/<int:id>/', views.delete_hotel, name='deleteHotel'),

#     # 用户主页酒店分页
#     path('yonghu/',views.yonghu,name='yonghu'),

# ]

# orders = [
#     path('comment_add/<oid>',views.commentAdd,name='commentAdd'),
#     path('ucmt/',views.usercomment,name='ucmt'),
#     path('cmtdel/<cid>',views.cmtdel,name='cmtdel'),
#     # 管理员查看订单
#     path('aods/',views.aorders,name='aods'),
#     path('odstart/',views.odstart,name='odstart'),
#     path('odfinish/',views.odfinish,name='odfinish'),
#     # 管理员查看评论
#     path('acmt/',views.acmt,name='acmt'),

#     # 统计
#     path('areaRate/',views.areaRate,name='areaRate'),
# ]

urlpatterns = [
    # 登录注册
    path('login/', views.login, name='login'),
    path('register/', views.register, name='register'),

    # ============= user ==================
    # 支付
    path('user_pay/', views.user_pay),
    path('user_change_password/', views.user_change_password),
    path('user_info_list/<user_id>/', views.user_info_list),
    path('user_info_list/', views.user_info_list_admin),
    path('user_info_update/', views.user_info_update),

    # ============ user - collection ============
    path('user_collect_hotel/', views.user_collect_hotel),
    path('user_collection_list/', views.user_collection_list),
    path('user_collection_cancel/', views.user_collection_cancel),

    # ============ user - points ============
    path('user_points_add/', views.user_points_add),
    path('user_points_list/', views.user_points_list),

    # ============= user - wallet =============
    path('user_wallet_recharge/', views.user_wallet_recharge),
    # get user balance, detail
    path('user_wallet_detail/', views.user_wallet_detail),

    # ================= hotel ================
    # 搜索酒店
    path('hotel_search/', views.hotel_search),
    # 酒店详情
    path('hotel_detail/<htid>/', views.hotel_detail, name='hotel_detail'),
    # 预约酒店
    path('hotel_booking/', views.hotel_booking),
    path('hotel_add/', views.hotel_add),
    path('hotel_image_upload/<hotel_id>/', views.img_upload),
    path('hotel_image_download/<hotel_id>/', views.hotel_image),
    path('hotel_update/', views.hotel_update),

    # ============ hotel - room =============
    path('room_add/', views.room_add),
    path('room_list/', views.room_list),
    path('room_delete/<room_id>/', views.room_delete),
    path('room_update/', views.room_update),

    # ======== hotel - rank ============
    path('hotel_rank_list/', views.hotel_rank_list),
    path('hotel_rank_add/', views.hotel_rank_add),
    path('hotel_rank_delete/<hotel_id>/', views.hotel_rank_delete),
    # ======== hotel - hotel_recommend ============
    path('hotel_recommend_list/', views.hotel_recommend_list),
    path('hotel_recommend_add/<hotel_id>/', views.hotel_recommend_add),
    path('hotel_recommend_delete/<hotel_id>/', views.hotel_recommend_delete),

    # ================== coupon ==================
    path('coupon_template_add/', views.coupon_template_add),
    path('coupon_template_edit/', views.coupon_template_edit),
    path('coupon_template_list/', views.coupon_template_list),
    path('coupon_entity_list/', views.coupon_entity_list),
    path('coupon_exchange/', views.coupon_exchange),
    path('coupon_template_deprecate/<coupon_template_id>/', views.coupon_template_deprecate),
    path('coupon_template_recover/<coupon_template_id>/', views.coupon_template_recover),

    # ======================== order ============================

    # 订单列表
    path('orders_list/', views.orders_list),
    # 取消订单
    path('order_cancel/<order_id>/', views.order_cancel),
    path('order_status_update/', views.order_status_update),

    # ========================= comment =======================
    path('comment_add/', views.comment_add),
    path('comment_delete/<comment_id>/', views.comment_delete),
    path('comment_list/', views.comment_list),

    # ============= news ===============
    path('news_add/', views.news_add),
    path('news_list/', views.news_list),
    path('news_delete/<news_id>/', views.news_delete),

    # =========================== rate ========================
    path('user_register_num/', views.user_register_num),
    path('daily_income_list/', views.daily_income_list),
    path('area_order_num/', views.area_order_num),
    path('rate_order_area/', views.rate_order_area),
    path('pay_route_list/', views.pay_route_list),
    path('pay_route_add/', views.pay_route_add),


    # hotel - activity
    path('activity_apply/', views.activity_apply),
    path('activity_apply_list/', views.activity_apply_list),
    path('activity_audit/', views.activity_audit),
    path('activity_delete/', views.activity_delete),
    path('activity_list/', views.activity_list),
    path('user_activity_join/', views.user_activity_join),
    path('user_activity_list/', views.user_activity_list),
    path('activity_user_count/', views.activity_user_count),

    path('num_classified_order/', views.num_classified_order),
]
